##
#
# @file
#
# @brief Configure script of LibBSP for the LPC176X board.
#

AC_PREREQ([2.69])
AC_INIT([rtems-c-src-lib-libbsp-arm-lpc176x],[_RTEMS_VERSION],
				[https://devel.rtems.org/newticket])
AC_CONFIG_SRCDIR([bsp_specs])
RTEMS_TOP(../../../../../..)

RTEMS_CANONICAL_TARGET_CPU
AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2])
RTEMS_BSP_CONFIGURE

RTEMS_PROG_CC_FOR_TARGET
RTEMS_CANONICALIZE_TOOLS
RTEMS_PROG_CCAS

RTEMS_CHECK_NETWORKING
AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "no")

RTEMS_BSPOPTS_SET([ARM_LPC1768],[*],[0])
RTEMS_BSPOPTS_HELP([ARM_LPC1768],[target used for identify LPC1768 board])

RTEMS_BSPOPTS_SET([BSP_MINIMUM_TASK_STACK_SIZE],[*],[1024])
RTEMS_BSPOPTS_HELP([BSP_MINIMUM_TASK_STACK_SIZE],[Suggested minimum task stack
			size in bytes])

RTEMS_BSPOPTS_SET([BSP_SMALL_MEMORY],[*],[])
RTEMS_BSPOPTS_HELP([BSP_SMALL_MEMORY],[disable testsuite
			samples with high memory demands])

RTEMS_BSPOPTS_SET([LPC176X_OSCILLATOR_MAIN],[*],[12000000U])
RTEMS_BSPOPTS_HELP([LPC176X_OSCILLATOR_MAIN],[main oscillator frequency in Hz])

RTEMS_BSPOPTS_SET([LPC176X_OSCILLATOR_RTC],[*],[32768U])
RTEMS_BSPOPTS_HELP([LPC176X_OSCILLATOR_RTC],[RTC oscillator frequency in Hz])

RTEMS_BSPOPTS_SET([LPC176X_CCLK],[*],[96000000U])
RTEMS_BSPOPTS_HELP([LPC176X_CCLK],[CPU clock in Hz])

RTEMS_BSPOPTS_SET([LPC176X_PCLKDIV],[*],[1U])
RTEMS_BSPOPTS_HELP([LPC176X_PCLKDIV],[clock divider for default
			PCLK (PCLK = CCLK / PCLKDIV)])

RTEMS_BSPOPTS_SET([LPC176X_UART_BAUD],[*],[9600U])
RTEMS_BSPOPTS_HELP([LPC176X_UART_BAUD],[baud for UARTs])

RTEMS_BSPOPTS_SET([LPC176X_CONFIG_CONSOLE],[*],[0])
RTEMS_BSPOPTS_HELP([LPC176X_CONFIG_CONSOLE],[configuration
			for console (UART 0)])

RTEMS_BSPOPTS_SET([LPC176X_STOP_GPDMA],[*],[1])
RTEMS_BSPOPTS_HELP([LPC176X_STOP_GPDMA],[stop general purpose DMA
			at start-up to avoid DMA interference])

RTEMS_BSPOPTS_SET([LPC176X_STOP_USB],[*],[1])
RTEMS_BSPOPTS_HELP([LPC176X_STOP_USB],[stop USB controller
			at start-up to avoid DMA interference])

RTEMS_BSPOPTS_SET([LPC_DMA_CHANNEL_COUNT],[*],[2])
RTEMS_BSPOPTS_HELP([LPC_DMA_CHANNEL_COUNT],[DMA channel count])

RTEMS_BSP_CLEANUP_OPTIONS(0, 1)
RTEMS_BSP_LINKCMDS

AC_CONFIG_FILES([Makefile])
AC_OUTPUT
